<?php

namespace App\Library\Requests\Plug;

use App\Library\Requests\Base\ShopProductSpecNumberRequest;
use App\Library\Rules\ShopProductSpecNumberRule;

class PlugCreateRequest extends ShopProductSpecNumberRequest
{
    public function rules(): array
    {
        return [
            'serialNumber'=>'required|string|size:20|regex:' . __('com.numReg'),
            'plug' => 'nullable|boolean',
            'addressId' => 'required|integer|min:1',
            'code' => 'nullable|string|size:32|regex:' . __('com.codeReg'),
            'version' => 'nullable|integer|in:2',
        ];
    }
}
